//
//  BIDEvaluateInfoView.m
//  HJGJCommunity
//
//  Created by mal on 2017/6/9.
//  Copyright © 2017年 mal. All rights reserved.
//

#import "BIDEvaluateInfoView.h"

@implementation BIDEvaluateInfoView
@synthesize contentTextView;
@synthesize delegate;

- (void)awakeFromNib
{
    [super awakeFromNib];
    _closeBtn.layer.cornerRadius = CGRectGetHeight(_closeBtn.frame)/2;
    _closeBtn.clipsToBounds = YES;
}

- (void)setScore:(NSUInteger)score
{
    if(score == 0) return;
    NSArray *btnArr = @[_oneBtn, _twoBtn, _threeBtn, _fourBtn, _fiveBtn];
    int count = 1;
    for(UIButton *btn in btnArr)
    {
        if(count <= score)
        {
            [btn setBackgroundImage:[UIImage imageNamed:@"star_highlight.png"] forState:UIControlStateNormal];
        }
        else
        {
            break;
        }
        count++;
    }
}

- (IBAction)closeBtnHandler:(id)sender
{
    [self removeFromSuperview];
    [delegate removeView];
}

@end
